import { ESGeoPolygon, ESObjectsManager, ESVOptionUeWs } from "earthsdk2s";
import { copyright } from "./copyright";
import { ESUeViewer } from "./index";
copyright.print()


const objm = new ESObjectsManager(ESUeViewer);
console.log('ESObjectsManager', objm);
const opt = {
    container: 'ueContainer',
    type: 'ESUeViewer',
    options: { ws: 'http://192.168.0.20:80', esmsg: 'http://192.168.0.20:80' }
} as ESVOptionUeWs;
const viewer = objm.createUeViewer(opt) as ESUeViewer;
viewer.debug = true;
viewer.statusUpdateInterval = 0;
console.log('ESUeViewer', viewer);

//@ts-ignore
window.g_v = viewer;
//@ts-ignore
window.g_objm = objm;


const sceneobject = objm.createSceneObjectFromClass(ESGeoPolygon);
sceneobject.points = [[-108.0, 25.0, 100000], [-100.0, 25.0, 100000], [-100.0, 30.0, 100000], [-108.0, 30.0, 300000]];
sceneobject.stroked = true;
sceneobject.strokeStyle = {
    width: 2,
    widthType: 'screen',
    color: [1, 0, 0, 1],
    material: '',
    materialParams: {},
    ground: false
}

console.log('ESGeoPolygon', sceneobject);

export { };

